<?php if ( ! defined('BASEPATH')) exit('This file does not run directly. Sorry.'); ?>
<?php
/**
 * Kalaisoo.
 *
 * A lightweight no-framework framework written in PHP.
 *
 * @package Kalaisoo
 * @author $Author: info@sah-company.com $
 */
?>
<!-- User with name, avatar and other information -->
<header class="user">
	<h1><?php echo htmlspecialchars($user->name()); ?></h1>
	<!-- Figure of user: Is he fat? Is he skinny? :-) -->
	<figure>
		<a
			href="{language}/editor/index/"
			accesskey="m"
			id="usr">
			<img
				src="<?php echo $user->gravatar(); ?>"
				alt="<?php echo htmlspecialchars($user->name()); ?>"
				title="<?php echo htmlspecialchars($user->name()); ?>"
				style="width: <?php echo $avatar['size']; ?>px; height: <?php echo $avatar['size']; ?>px;"
			/>
		</a>
		<div id="heartbeat" data-target="<?php echo ahref('{language}/user/heartbeat/'); ?>" style="display: <?php echo (isset($_SESSION['blog_counter'])) ? 'block' : 'none'; ?>;"><?php echo (isset($_SESSION['blog_counter'])) ? $_SESSION['blog_counter'] : ''; ?></div>
	</figure>
	<!-- /Figure -->
	<!-- Navigation -->
	<nav class="main">
		<h2><?php echo __('toolbar'); ?></h2>
		<ul>
			<li>
				<a href="{language}/editor/index/" accesskey="o"><?php echo __('file'); ?></a>
			</li>
			<li>
				<a href="{language}/editor/find/"  accesskey="f"><?php echo __('find'); ?></a>
			</li>
			<li class="hr">
				<a href="{language}/user/profile/" accesskey=","><?php echo __('profile');?></a>
			</li>
			<li>
				<a href="{language}/user/logout/" accesskey="q"><?php echo __('logout'); ?></a>
			</li>
		</ul>
	</nav>
	<!-- /Navigation -->
	<!-- Breadcrumbs, if any -->
	<?php
	/**
	 * gather any breadcrumbs and display them in a nav class breadcrumbs as an unordered list.
	 */
	$breadcrumbs = Registry::instance()->breadcrumbs();
	if ( ! empty($breadcrumbs)):
	?>
	<nav class="urhere">
		<h2><?php echo __('urhere'); ?></h2>
		<ul class="breadcrumb">
	<?php
		foreach ($breadcrumbs as $n=>$crumb):
	?>
			<li>
				<a
					href="<?php echo $crumb['url']; ?>">
					<?php echo $crumb['linktext'],"\n"; ?>
				</a>
			</li>
	<?php
		endforeach;
	?>
		</ul>
	</nav>
	<?php
	endif;
	?>
	<!-- /Breadcrumbs -->
</header>
<!-- /User -->
